<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 在此处编写的代码就是js代码

    // 1.在body中显示
    // document.write('Hello,JavaScript!');

    // 2.在alert警告框中显示
    // alert('Hello,JavaScript!');

    // 3.在console控制台中显示
    console.log('Hello,JavaScript!');
  </script>
</body>
</html>